package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"navi-mumbai/app/api/pay/internal/config"
	"navi-mumbai/app/rpc/pay/client/paysys"
	"navi-mumbai/app/rpc/wallet/client/walletsys"
)

type ServiceContext struct {
	Config config.Config

	PaySysRpc    paysys.PaySys
	WalletSysRpc walletsys.WalletSys
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:       c,
		PaySysRpc:    paysys.NewPaySys(zrpc.MustNewClient(c.PayRpcConf)),
		WalletSysRpc: walletsys.NewWalletSys(zrpc.MustNewClient(c.WalletRpcConf)),
	}
}
